
{literal}
<script type="text/javascript">

var cbCount;

function selectAll(state){
	for(var i=0;i<document.userStats.elements.length;i++){
		if (document.userStats.elements[i].getAttribute('type')=='checkbox')
	 	document.userStats.elements[i].checked = state;
	}
}


function checkEmpty(){	//var formel = document.userStats.elements;	var isChecked = false;
	var i
	var s=0;	for(var i=0;i<document.userStats.elements.length;i++){		if (document.userStats.elements[i].getAttribute('type')=='checkbox' && document.userStats.elements[i].checked){
       isChecked = true;
       s++;
       }
	}
    return s;
}


function formSubmit(){
     if(!checkEmpty()) {     	alert ("Select at least one entry!");
     	return;
     }
     //alert(document.getElementById("action").value);
     if (document.getElementById("mailshotMode").value == "EmailNegativePerf"){     	 document.getElementById("action").value = 1;
     }
     //alert(document.getElementById("action").value);
     if (confirm("Message will be sent to "+checkEmpty()+" user(s)!"))
     document.userStats.submit();
}


function setNegativeCB() {
 	var cnter=1;
 	while(document.getElementById("trial"+cnter)) { 		if(document.getElementById("trial"+cnter).value=="" && document.getElementById("subscr"+cnter).value==0 && document.getElementById("pips"+cnter).value<=0) 			document.getElementById(cnter).checked=true; 		cnter++;
 	}
}

function showActCode(iid) {	var inputname = "code"+iid;
    if(document.getElementById("code"+iid).style.display=="none"){
 		document.getElementById("code"+iid).style.display="block";
 		//document.userStats.inputname.select();
 		//document.userStats.inputname.focus();
 	} else{
 		document.getElementById("code"+iid).style.display="none";
 	}
}

function deleteUser(uid,uname,umail) {

 	if (confirm("Do you really want to delate user "+uname+"("+umail+")?") && confirm("Do you still want to delate user "+uname+"("+umail+") ?")){
 			document.location="admin.php?p=userstats&uid="+uid+"&action=delete";
 	}
}


</script>
{/literal}

{$userAdmin->loadForecasts()}
<h3>TOTAL User stats </h3>

{include file="admin/admin_menu.tpl"}

Registered Users: {$userAdmin->totalUsers}<br>
Active Subscribers: {$userAdmin->activeSubscribers}<br>
Activated Users: {$userAdmin->activeUsers}<br>
Subscribed Users: {$userAdmin->subscrUsers}<br>
Registered within 7 days: {$userAdmin->regWithin7} {*(activated - {$userAdmin->actWithin7})*}<br>
Registered yesterday: {$userAdmin->regYesterday} {*(activated - {$userAdmin->actYesterday})*}<br>
<br><br>

